home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / src / Games / dinkum3 / actor.c next >
C/C++ Source or Header  |  1995-05-03  |  19KB  |  677 lines

  1. #define ACTOR
  2. #include "dink_sym.h"
  3. #include "dink_glb.h"
  4.  
  5. #if (PROTOTYPE)
  6. void actor(int n)
  7. #else
  8. actor(n)
  9. int n ;
  10. #endif
  11. /********************************************************************/
  12. /*                                                                  */
  13. /* Software by Gary A. Allen, Jr. 12 December 1992, Version: Mk 1.3 */
  14. /*           (c) Copyright 1992 by Gary A. Allen, Jr.               */
  15. /*                                                                  */
  16. /********************************************************************/
  17. {
  18. register int i, j ;
  19. int sw_found ;
  20. static int sw_door_kick = FALSE ;
  21.  
  22. OBJECT_STRUCT *pnt, *point ;
  23.  
  24. #if (PROTOTYPE)
  25. void objector(OBJECT_STRUCT*) ;
  26. #endif
  27.  
  28. switch(n) {
  29.  
  30. /* mine elevator */
  31. case R_lift_entr:
  32.     switch(Lift_door->Status) {
  33.     case S_closed:
  34.         printf("The lift doors are closed and the lift call button ");
  35.         printf("is not glowing. It \nseems the electrical power has ");
  36.         printf("been turned off at the main switch. \n");
  37.         break ;
  38.         
  39.     case S_flashing:
  40.         printf("The lift doors are closed.  However the call button");
  41.         printf(" is flashing. There \n") ;
  42.         printf("is the sound of electrical equipment ");
  43.         printf("humming within the mine lift. \n");
  44.         break ;
  45.         
  46.         case S_open:
  47.         printf("The lift doors are standing open. \n");
  48.         break ;
  49.     }
  50.     break;
  51.  
  52. /* office building door */
  53. case R_office_entr:
  54.     switch(Door->Status) {
  55.     case S_open:
  56.         printf("      --- The office front door is open. --- \n");
  57.         break;
  58.  
  59.     case S_kicked:
  60.         if (!sw_door_kick) {
  61. printf("The lock of the front door has been shot at several times.\n"); 
  62. printf("The door itself has been kicked in and is broken off at\n") ;
  63. printf("the hinges.  The passage way is free to enter.\n");
  64.             sw_door_kick = TRUE ;
  65.         }
  66.         else {
  67. printf("The front door of the office has been kicked in. \n") ;
  68.         }
  69.         break ;
  70.  
  71.     default:
  72. printf("The office has a front door with a sun faded sign \n"); 
  73. printf("upon which is written:  \"Sorry, We are CLOSED\". \n");
  74. printf("      --- The office door is shut. --- \n");
  75.         break ;
  76.     }
  77.     break ;
  78.  
  79. /* Site Managers Office */
  80. case R_office_mang:
  81.     if (Picture->Status == S_closed) {
  82. printf("On the wall is a picture of a platypus wearing a hat with");
  83.         printf(" corks \ndangling from the hat's rim.\n");
  84.         break;
  85.     }
  86.     if ((Safe->Status != S_open)&&(Picture->Status == S_open)) {
  87. printf("Before you is a picture hinged to the wall that has been ");
  88. printf("swung \nopen revealing a closed combination dial wall safe.\n");
  89.         break;
  90.     }
  91.     if ((Safe->Status == S_open)&&(Picture->Status == S_open)) {
  92. printf("Before you is a picture hinged to the wall that has been");
  93. printf(" swung \nout revealing a wall safe with an open door.\n");
  94.         sw_found = FALSE ;
  95.         pnt = object ;
  96.         for (i = 0; i < Objcnt; i++) {
  97.             if (pnt->Location == B_in_safe) {
  98.                 sw_found = TRUE ;
  99. printf ("You see the following inside the safe: \n");
  100.                 point = object ;
  101.                 for (j = 0; j < Objcnt; j++) {
  102.                     if (point->Location == B_in_safe) {
  103.                         printf ("        ");
  104.                         objector(point) ;
  105.                         printf("\n") ;
  106.                     }
  107.                     point++ ;
  108.                 }                
  109.                 if (gleep_safe != 0) {
  110.                     printf ("        ");
  111.                     if (gleep_safe == 1) 
  112.                         printf("one gleep\n") ;
  113.                     else printf("%d gleeps\n",gleep_safe) ;
  114.                 }
  115.                 break;
  116.             }
  117.             pnt++ ;
  118.         }
  119.         if (sw_found) break ;
  120.         if (gleep_safe != 0) {
  121. printf("There is nothing in the safe except ") ;
  122.             if (gleep_safe == 1) 
  123.                 printf("a single gleep.\n") ;
  124.             else
  125.                 printf("%d gleeps.\n",gleep_safe) ;
  126.             break ;
  127.         }
  128.         printf("---The safe is empty.--- \n");
  129.         break ;
  130.     } /* end of the "safe open" block */
  131.  
  132. /* store room */
  133. case R_store_room:
  134.     printf("There is a 1500 Volt circuit breaker box on the wall");
  135.     if (Circuit_breaker->Status) 
  136. printf(" which has \na switch set in the \"on\" position. \n"); 
  137.     else
  138. printf(" which has \na switch set in the \"off\" position. \n"); 
  139.     break;
  140.  
  141. /* lift compartment */
  142. case R_lift_inside:
  143.     printf("The level button with the number "); 
  144.     switch(Lift->Status) {
  145.         case L0:
  146.             printf("zero"); 
  147.             break ;
  148.         case L49:
  149.             printf("forty-nine"); 
  150.             break ;
  151.         case L67:
  152.             printf("sixty-seven");
  153.             break ;
  154.         case L82:
  155.             printf("eighty-two"); 
  156.             break ;
  157.     } /* end of the Lift->Status "switch" block */
  158.     printf(" is flashing. \n"); 
  159.     break;
  160.  
  161. } /* end of the "switch" block */ 
  162. } /* --- end of subroutine "actor"--- */
  163.  
  164. #if (PROTOTYPE)
  165. void objector(OBJECT_STRUCT *pnt)
  166. #else
  167. objector(pnt)
  168. OBJECT_STRUCT *pnt ;
  169. #endif
  170. {
  171. /* Deal with transformed objects */
  172. if (pnt->Type == Z_alias) {
  173.     if (pnt->ID == V_rifle) {
  174. printf("an M16 infantry rifle with an ammunition clip inserted") ;
  175.         return ;
  176.     }
  177.     if (pnt->ID == V_dynamite) {
  178. printf("a large stick of dynamite with a fuse type blasting cap") ;
  179.         return ;
  180.     }
  181. }
  182. else printf("%s",pnt->Text) ;
  183. } /* --- end of subroutine "objector"--- */
  184.  
  185. #if (PROTOTYPE)
  186. void killer(int n)
  187. #else
  188. killer(n)
  189. int n ;
  190. #endif
  191. /********************************************************************/
  192. /*                                                                  */
  193. /*  This subroutine had a serious error in it which was discovered  */
  194. /*  by Byron Rakitzis.   Thanks, Byron!                             */
  195. /*                                                                  */
  196. /*  Software by Gary A. Allen, Jr. 19 January 1992  Version: Mk 1.4 */
  197. /*           (c) Copyright 1993 by Gary A. Allen, Jr.               */
  198. /*                                                                  */
  199. /********************************************************************/
  200. {
  201. register int j ;
  202.  
  203. int hits ;
  204. int sw_other_object ;
  205. static int sw_hurt = FALSE ;
  206.  
  207. MONSTER_STRUCT *mnstr ; 
  208. OBJECT_STRUCT *pnt ; 
  209.  
  210. #if (PROTOTYPE)
  211. void boom(void), ender(int), gleeper(int), the_fork(void) ;
  212. int shoot_it(void) ;
  213.  
  214. #else
  215. /* Function prototype for K&R-C */
  216. int shoot_it() ;
  217. #endif
  218.  
  219. /* Insult the user if he asks for suicide */
  220. if (tag[V_self]) {
  221.     the_fork() ;
  222.     return ;
  223. }
  224.  
  225. /* Deal with the wrong sorts of "kill" commands */
  226. if (verb == V_kill) {
  227.     /* Verb "kill" only */
  228.     if (tag[V_VERB_ONLY]) {
  229. printf("It may be obvious to you, but you are going to have to tell\n");
  230. printf("me exactly what it is you want to have killed, and \n") ;
  231. printf("with what sort of weapon. \n") ;
  232.         return;
  233.     }
  234.  
  235.     if (!tag[V_rifle]) {
  236.         if (tag[V_dynamite]) {
  237.             if (Dynamite->Location == B_have) {
  238. printf("You'll find the dynamite is not all that formidable of a weapon.\n") ;
  239. printf("Try lighting some with a match and you'll see why.\n") ;
  240.             }
  241.             else 
  242. printf("You silly gallah! You don't have any dynamite in your possession!\n") ;
  243.         }
  244.         else printf("What weapon am I suppose to use? \n") ;
  245.         return ;
  246.     }
  247. }
  248.  
  249. sw_other_object = FALSE ;
  250.  
  251. /* shoot Ned Kely */
  252. if (tag[V_ned]) {
  253.     if (Ned->Location == B_destroyed) {
  254. printf("Forget it, you drongo!! Ned Kelly is already dead!\n") ;
  255.         return ;
  256.     }
  257.     if (Ned->Status == F_asleep) {
  258. printf("There is no Ned Kelly here for me to kill! \n") ;
  259.         return ;
  260.     }
  261.  
  262.     /* Fire the rifle */
  263.     if ((hits = shoot_it()) == 0) return  ;
  264.  
  265. printf("Ned Kelly keels over dead.  His body suddenly glows a bright ");
  266. printf("orange like it\nis being consummed by a heatless flame ");
  267. printf("and then the late Ned Kelly disappears\ninto a puff of ") ;
  268. printf("blue smoke. \n\n") ;
  269. printf("By the way, the recently deceased bushranger ***was*** ");
  270. printf("wearing iron body\narmour.  However thin sheets of iron ");
  271. printf("would just barely work against nineteenth\ncentury firearms ");
  272. printf("at long range.  Against a modern infantry rifle, Ned's\n");
  273. printf("armour offered about as much protection as a dunny paper ");
  274. printf("bandage. \n") ;
  275.     Ned->Location = B_destroyed ;
  276.     Ned->Status = F_asleep ;
  277.     monster_flag = F_no_monster ;
  278.     room[R_hideout][M_monster] = 0 ;
  279.     
  280.     /* create Ned Kelly's silver teapot */
  281.     ++room[R_hideout][M_obj_cnt] ;
  282.     Teapot->Location = R_hideout ;
  283.     return ;
  284. } /* end of the Ned Kelly block */
  285.  
  286. /* shoot the drop bear */
  287. if (tag[V_bear]) {
  288.     for (j = 2; j <= 5; j++) {
  289.         mnstr = (monster_start + j) ;  /* point to the monster */
  290.         if (mnstr->Status != F_asleep) break ;
  291.     }
  292.     if (j > 5) {
  293.         printf("I see no drop bear for me to kill! \n") ;
  294.         return ;
  295.     }
  296.  
  297.     /* Fire the rifle */
  298.     if ((hits = shoot_it()) == 0) return  ;
  299.  
  300.     /* Toggle the hurt switch if this is the first hit */
  301.     if (mnstr->Hits == 0)  sw_hurt = FALSE ;
  302.     mnstr->Hits += hits ;
  303.  
  304.     if (mnstr->Hits < 30) {
  305.         /* Bear freaks out from being shot too much */
  306.         if (sw_hurt && (mnstr->Hits >= 10)) {
  307. printf("The drop bear has been shot at so many times, that it ");
  308. printf("has gone mad\n") ;
  309. printf("with rage.  It leaps three metres and rips out your ") ;
  310. printf("throat with a\n");
  311. printf("single swish of its claws.  You die instantly. \n") ;
  312.             ender(F_died) ;
  313.         }
  314.  
  315.         if (mnstr->Hits == 1) {
  316. printf("Your bullet hit the drop bear causing it to howl in ");
  317. printf("anguish.  However drop\n");
  318. printf("bears are pretty tough and just one bullet isn't ");
  319. printf("going to kill it.\n") ;
  320.         }
  321.         else {
  322.             if (!sw_hurt) {
  323. printf("You've hit the drop bear and it is bleeding fairly ");
  324. printf("heavily.\n");
  325. printf("Unfortunately it is still alive and kicking and wants ") ;
  326. printf("your blood \n");
  327. printf("in payment for its.\n") ;
  328.                 sw_hurt = TRUE ;
  329.             }
  330.             else {
  331. printf("You've hit the drop bear again.  It is weakening but still ");
  332. printf("alive.\n");
  333.             }
  334.         }
  335.         monster_flag = F_wounded ;
  336.         return ;
  337.     }
  338.  
  339.     if (rifle_flag == F_single) {
  340. printf("That last bullet was the straw which broke the drop ") ;
  341. printf("bear's back.\n") ;
  342. printf("The blasted thing is finally dead! \n") ;
  343.     }
  344.     else {
  345. printf("The bullets riddled the drop bear with holes, killing it ") ;
  346. printf("instantly.\n") ; 
  347.     }
  348. printf("Suddenly the drop bear's corpse turns into a cloud of greasy ");
  349. printf("blue smoke,\n") ;
  350. printf("which floats away without a trace.\n") ;
  351.     sw_hurt = FALSE ;
  352.     mnstr->Location = B_destroyed ;
  353.     mnstr->Status = F_asleep ;
  354.     monster_flag = F_no_monster ;
  355.     room[n][M_monster] = 0 ;
  356.     return ;
  357.  
  358. } /* end of the drop bear block */
  359.  
  360. /* shoot the mutant wombat */
  361. if (tag[V_wombat]) {
  362.     if (Wombat->Status == F_asleep) {
  363.         printf("I see no wombat for me to kill!\n");
  364.         return ;
  365.     }
  366.  
  367.     /* Fire the rifle */
  368.     if ((hits = shoot_it()) == 0) return  ;
  369.  
  370.     /* Toggle the hurt switch if this is the first hit */
  371.     if (Wombat->Hits == 0)  sw_hurt = FALSE ;
  372.     Wombat->Hits += hits ;
  373.  
  374.     if (Wombat->Hits < 300) {
  375.         if (Wombat->Hits == 1) {
  376. printf("Your bullet hit the wombat causing it some minor discomfort.");
  377. printf("  Judging from its \n");
  378. printf("behavior, killing this beast is going to be tough! \n") ;
  379.         }
  380.         else {
  381.             if (!sw_hurt) {
  382. printf("You've hit the wombat and got its attention ") ;
  383. printf("but you've not\n");
  384. printf("seriously wounded it.  In fact, you've made it more fierce ");
  385. printf("than before.\n");
  386.                 sw_hurt = TRUE ;
  387.             }
  388.             else {
  389. printf("You've hit the wombat again, but it is still going ");
  390. printf("strong.\n");
  391.             }
  392.         }
  393.         monster_flag = F_wounded ;
  394.         return ;
  395.     }
  396.  
  397.     if (rifle_flag == F_single) {
  398. printf("That last bullet was the straw which broke the ") ;
  399. printf("wombat's back.\n") ;
  400. printf("The blasted thing is finally dead!\n\n") ;
  401.     }
  402.     else {
  403. printf("The bullets did the trick on the wretched thing.  It's ") ;
  404. printf("dead as a doornail.\n\n") ;
  405.     }
  406. printf("Suddenly the wombat's corpse starts to glow with an intense");
  407. printf(" white light.\n") ;
  408. printf("There is then a crackling sound as its body starts to burn.");
  409. printf("  You can\n");
  410. printf("smell the stench of burning hair.  Then the white light");
  411. printf(" begins to dim,\n");
  412. printf("leaving no trace left of the once formidable monster.\n");
  413.     sw_hurt = FALSE ;
  414.     Wombat->Location = B_destroyed ;
  415.     Wombat->Status = F_asleep ;
  416.     monster_flag = F_no_monster ;
  417.     room[n][M_monster] = 0 ;
  418.     return ;
  419. } /* end of the mutant wombat block */
  420.  
  421. /* shoot the hoop snake */
  422. if (tag[V_snake]) {
  423.     for (j = 6; j <= 13; j++) {
  424.         mnstr = (monster_start + j) ;  /* point to the monster */
  425.         if (mnstr->Status != F_asleep) break ;
  426.     }
  427.     if (j > 13) {
  428.         printf("I see no hoop snake for me to kill! \n") ;
  429.         return ;
  430.     }
  431.  
  432.     /* Fire the rifle */
  433.     if ((hits = shoot_it()) == 0) return  ;
  434.  
  435.     /* Toggle the hurt switch if this is the first hit */
  436.     if (mnstr->Hits == 0)  sw_hurt = FALSE ;
  437.     mnstr->Hits += hits ;
  438.  
  439.     if ((rifle_flag == F_single)&&(mnstr->Hits < 3)) {
  440.         if (mnstr->Hits == 1) {
  441. printf("Your bullet hit the hoop snake.  However the hoop snake's ");
  442. printf("thick scales \n");
  443. printf("slowed the bullet down.  The hoop snake is now hissing ");
  444. printf("furiously. \n") ;
  445.         }
  446.         else {
  447. printf("You've hit the hoop snake again, and it's hurting.  However ");
  448. printf("it is still \n");
  449. printf("alive and full of venom. \n") ;
  450.         }
  451.         monster_flag = F_wounded ;
  452.         return ;
  453.     }
  454.  
  455.     if (rifle_flag == F_single) {
  456. printf("The bullet hit the hoop snake finishing the horrible ") ;
  457. printf("creature off. \n") ;
  458.     }
  459.     else {
  460. printf("The bullets hit the hoop snake splatting it into a mass of ") ;
  461. printf("mince meat. \n") ; 
  462.     }
  463. printf("Suddenly the bullet holed snake glows red and whooshes ");
  464. printf("into a cloud \n") ;
  465. printf("steam, leaving no traces behind.\n\n") ;
  466.     mnstr->Location = B_destroyed ;
  467.     mnstr->Status = F_asleep ;
  468.     monster_flag = F_no_monster ;
  469.     room[n][M_monster] = 0 ;
  470.     return ;
  471. } /* end of the hoop snake block */
  472.  
  473. /* see if the target is in the room or holding it */
  474. pnt = object ;
  475. for (j = 0; j < Objcnt; j++) {
  476.     if (tag[pnt->ID]){
  477.          if (pnt->ID == V_rifle) continue ;
  478.         sw_other_object = TRUE ;
  479.         if (pnt->Location == n)  break ;
  480.         if (pnt->Location == B_have) {
  481. printf("I will ***NOT*** shoot at something that I'm holding!!\n");
  482.             return ;
  483.         }
  484.     }
  485.     pnt++ ;
  486. }
  487. /* Object shoot at */
  488. if (j < Objcnt) {
  489.  
  490.     switch(pnt->ID) {
  491.  
  492.     case V_can:
  493.     case V_beer:
  494.     case V_fourex:
  495.     case V_Fourex:
  496.         if ((hits = shoot_it()) == 0) return  ;
  497. printf("The can is hit by a bullet and flies off out of sight.\n");
  498.         Can->Location = B_destroyed ;
  499.         return;
  500.  
  501.     case V_bottle:
  502.     case V_lager:
  503.         if ((hits = shoot_it()) == 0) return  ;
  504. printf("It is hit by a bullet and shatters into a million pieces.\n");
  505.         Bottle->Location = B_destroyed ;
  506.         return;
  507.  
  508.     case V_dynamite:
  509.         if ((hits = shoot_it()) == 0) return  ;
  510. printf("Nothing happens!  The \"dynamite\" is actually a very safe\n") ;
  511. printf("mining explosive which won't detonate even if impacted by a high\n") ;
  512. printf("speed bullet (TRUE story!).  However this sort of explosive will\n") ;
  513. printf("always detonate with a blasting cap.\n") ;
  514.         return;
  515.  
  516.     case V_cap:
  517.         if ((hits = shoot_it()) == 0) return  ;
  518. printf("POP!!  The blasting cap explodes but causes no damage.\n") ;
  519.         Cap->Location = B_destroyed ;
  520.         return;
  521.  
  522.     case V_gong:
  523.         if ((hits = shoot_it()) == 0) return  ;
  524.         printf("The bullet") ;
  525.         if (hits > 1) printf("s") ;
  526. printf(" went cleanly through the soft silver metal of\n") ;
  527. printf("the gong making a weird humming noise in the process.  It's\n") ;
  528. printf("a pointless waste of ammunition vandalizing this beautiful\n") ;
  529. printf("gong.\n") ;
  530.         return;
  531.         
  532.     case V_safe:
  533.         if (Picture->Status == S_open) {
  534.             if ((hits = shoot_it()) == 0) return  ;
  535. printf("The safe is made out of harden steel.  You'll only waste ") ;
  536. printf("ammunition \nshooting at it.  Try to unlock it instead. \n") ;
  537.         }
  538.         else printf("I don't see a safe to shoot at.\n") ;
  539.         return ;
  540.  
  541.     case V_letter:
  542.         if ((hits = shoot_it()) == 0) return  ;
  543.         boom() ; /* cause an explosion */
  544. printf("That was clever of you to realize the letter was really\n") ;
  545. printf("a letter bomb.  However shooting a letter bomb while you're\n") ;
  546. printf("right next to it was less than clever. Too bad you got blown\n") ;
  547. printf("to pieces discovering that bit of wisdom.\n\n") ;
  548.         ender(F_died) ;
  549.  
  550.     default:
  551.         if ((hits = shoot_it()) == 0) return  ;
  552. printf("Except for wasting ammunition nothing much happened.\n") ;
  553.         return ;
  554.     } /* end of target switch group */
  555. } /* end of the "object shot at" block */
  556.  
  557. if (sw_other_object) {
  558. printf("I don't see the target.\n") ;
  559.     return ;
  560. }
  561.  
  562. /* There was no target specified so the shot was wasted */
  563. if (tag[V_DIRECTION]) { 
  564.     /* Fire the rifle */
  565.     if ((hits = shoot_it()) == 0) return  ;
  566. printf("You shoot in that direction but didn't accomplish anything\n") ;
  567. printf("except waste ammunition.\n") ;
  568. }
  569. else {
  570. printf("It may be obvious to you, but I don't understand what you\n") ;
  571. printf("want to shoot at.\n");
  572. }
  573. return ;
  574.  
  575. } /* --- end of the "killer" subroutine --- */
  576.  
  577. #if (PROTOTYPE)
  578. int shoot_it(void)
  579. #else
  580. int shoot_it()
  581. #endif
  582. /********************************************************************/
  583. /*                                                                  */
  584. /*  Software by Gary A. Allen, Jr. 23 January 1993  Version: Mk 1.0 */
  585. /*           (c) Copyright 1993 by Gary A. Allen, Jr.               */
  586. /*                                                                  */
  587. /********************************************************************/
  588. {
  589. register int i ;
  590.  
  591. int hits, i_10, i_fract ;
  592.  
  593. if (Rifle->Location != B_have) {
  594. printf("I would do that.  Only there is one small problem.... \n") ;
  595.     printf("I don't have a rifle in my possession! \n") ;
  596.     return(0) ;
  597. }
  598.  
  599. /* Shoot the gun (or at least try to) */
  600. printf("You pull the trigger... \n\n") ;
  601.  
  602. if (clip_flag == F_no_clip) {
  603. printf("Nothing happens!  \n") ;
  604. printf("Your rifle doesn't have an ammunition clip in it.\n") ;
  605.     return(0) ;
  606. }
  607.  
  608. if (Rifle->Status <= 0) {
  609.     printf("Nothing happens!  The ammo clip is out of bullets.\n") ;
  610.     return(0) ;
  611. }
  612.  
  613. switch(rifle_flag) {
  614. case F_safety:
  615.     printf("Nothing happens!  The rifle's safety is still on.\n");
  616.     return(0) ;
  617.             
  618. case F_single:
  619.     printf("Bam! \n\n") ;
  620.     --Rifle->Status ;
  621.     if (clip_flag == F_normal_clip) hits = 1;
  622.         else hits = 100 ;
  623.     break ;
  624.  
  625. case F_triple:
  626.     if (Rifle->Status >= 3) {
  627.         printf("Bam! Bam! Bam! \n\n") ;
  628.         Rifle->Status -= 3 ;
  629.         if (clip_flag == F_normal_clip) hits = 3;
  630.             else hits = 300 ;
  631.     }
  632.     else {
  633.         for (i = 1; i <= Rifle->Status; i++)  printf("Bam! ") ;
  634.         printf("\n\nYou've run out of bullets. \n\n") ;
  635.         if (clip_flag == F_normal_clip) hits = Rifle->Status ;
  636.         else hits = Rifle->Status * 100 ;
  637.         Rifle->Status = 0 ;
  638.     }
  639.     break ;
  640.  
  641. case F_auto:
  642.     if (Rifle->Status >= 30) {
  643.         for (i = 1; i <= 3; i++) 
  644. printf("Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! \n") ;
  645.         Rifle->Status -= 30 ;
  646.         hits = 30;
  647.     }
  648.     else {
  649.         i_10 = Rifle->Status / 10 ;
  650.         i_fract = Rifle->Status - (i_10 * 10) ;
  651.         for (i = 1; i <= i_10; i++) 
  652. printf("Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! Bam! \n") ;
  653.         for (i = 1; i <= i_fract; i++)  printf("Bam! ") ;
  654.         printf("\n\nYou've run out of bullets. \n") ;
  655.         if (clip_flag == F_normal_clip)  hits = Rifle->Status ;
  656.         else hits = Rifle->Status * 100 ;
  657.         Rifle->Status = 0 ;
  658.     }
  659.     printf("\n") ;
  660.     break ;
  661. } /* end of rifle_flag "switch" block */
  662.  
  663. return(hits) ;
  664. } /* --- end of the "shoot_it" function --- */
  665.  
  666. #if (PROTOTYPE)
  667. void the_fork(void)
  668. #else
  669. the_fork()
  670. #endif
  671. {
  672. printf("If you could see me now then you'd see me giving you a well\n") ;
  673. printf("known Australian finger sign called \"The Fork\".  This is\n") ;
  674. printf("similar to the \"V\" for victory sign but has an entirely\n") ;
  675. printf("different meaning which I trust you understand.\n") ;
  676. } /* --- end of the "the_fork" function --- */
  677.